package cn.edu.zju.gis.disasterBE.sever.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@TableName("users")
@ApiModel("用户表")
public class User implements Entity<Integer> {
    @TableId(value = "uid", type = IdType.AUTO)
    @ApiModelProperty(value = "用户自增ID")
    @JSONField(name = "uid")
    private Integer uid;

    @TableField(value = "nick_name")
    @ApiModelProperty(value = "昵称")
    @JSONField(name = "username")
    private String nickName;

    @TableField(value = "pwd")
    @JSONField(name = "password")
    @ApiModelProperty(value = "用户密码")
    private String pwd;

    @TableField(value = "mail_addr")
    @JSONField(name = "email")
    @ApiModelProperty(value = "邮箱地址")
    private String mailAddr;

    @TableField(value = "work_place")
    @JSONField(name = "workplace")
    @ApiModelProperty(value = "工作地址")
    private String workPlace;

    @TableField(value = "job_type")
    @JSONField(name = "jobType")
    @ApiModelProperty(value = "工作类型")
    private String jobType;

    @TableField(value = "title")
    @JSONField(name = "title")
    @ApiModelProperty(value = "职称")
    private String title;

    @TableField(value = "first_name")
    @JSONField(name = "firstName")
    @ApiModelProperty(value = "名")
    private String firstName;

    @TableField(value = "last_name")
    @JSONField(name = "lastName")
    @ApiModelProperty(value = "姓")
    private String lastName;

    @TableField(value = "facebook")
    @JSONField(name = "facebook")
    @ApiModelProperty(value = "脸书账号")
    private String facebook;

    @TableField(value = "twitter")
    @JSONField(name = "twitter")
    @ApiModelProperty(value = "推特账号")
    private String twitter;

    @TableField(value = "affiliation")
    @JSONField(name = "affiliation")
    @ApiModelProperty(value = "所在单位")
    private String affiliation;

    @TableField(value = "address1")
    @JSONField(name = "address1")
    @ApiModelProperty(value = "地址1")
    private String address1;

    @TableField(value = "address2")
    @JSONField(name = "address2")
    @ApiModelProperty(value = "地址2")
    private String address2;

    @TableField(value = "zip_code")
    @JSONField(name = "zipCode")
    @ApiModelProperty(value = "邮编")
    private String zipCode;

    @TableField(value = "city")
    @JSONField(name = "city")
    @ApiModelProperty(value = "城市")
    private String city;

    @TableField(value = "country")
    @JSONField(name = "country")
    @ApiModelProperty(value = "国家")
    private String country;

    @TableField(value = "utype")
    @JSONField(name = "utype")
    @ApiModelProperty(value = "用户类型")
    private int uType;

    @Override
    public Integer id()
    {
        return uid;
    }

}
